using System;
using System.Web.UI.WebControls;

namespace Sedna.Core.Controller.Configurations
{
	/// <summary>
	/// Summary description for ValidatorConfiguration.
	/// </summary>
	public class ValidatorConfiguration : ClientScriptingConfiguration, IValidatorConfiguration
	{
		private string controlToValidate;
		private string errorMessageKey;
		private ValidatorDisplay display=ValidatorDisplay.Dynamic;
        private bool noControl = false;

        private bool enableClientScript = true;

        private string errorMessageKeyBindPath;
        private string errorMessageKeyUnbindPath;	    
	    

		public string ControlToValidate
		{
			get { return controlToValidate; }
			set { controlToValidate = value; }
		}

		public string ErrorMessageKey
		{
			get { return errorMessageKey; }
			set { errorMessageKey = value; }
		}

        public string ErrorMessageKeyBindPath
        {
            get { return errorMessageKeyBindPath; }
            set { errorMessageKeyBindPath = value; }
        }

        public string ErrorMessageKeyUnbindPath
        {
            get { return errorMessageKeyUnbindPath; }
            set { errorMessageKeyUnbindPath = value; }
        }

        public string ErrorMessageKeyPath
        {
            set
            {
                errorMessageKeyBindPath = value;
                errorMessageKeyUnbindPath = value;
            }
        }
	    
	    public bool EnableClientScript
	    {
	        get
	        {
                return this.enableClientScript;
	        }
	        set
	        {
                this.enableClientScript = value;
	        }
	    }

		public ValidatorDisplay Display
		{
			get { return display; }
			set { display = value; }
		}

	    public bool NoControl
	    {
            get { return noControl; }
	        set { noControl = value; }
	    }
	}
}
